package com.bgs.eat.menuBack.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

/**
 * @ClassName MenuBackEntity
 * @Description TODO
 * @Author cjl
 * @Date 2022/10/12 10:20
 **/
@Data
@Table(name = "menu_back")
public class MenuBackEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id; //菜单id

    private String menuName; //菜单名称

    private String icon; //图标名字

    private String path; //路径

    private Integer parentId; //父id

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime; //创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  updateTime; //修改时间

    private String back; //备注

    private Integer delFlag; // 删除标识   (0未删除 1已删除)

    private List<MenuBackEntity> childrens; // 权限菜单数据集

    private List<MenuBackEntity> childrenList; // 树形菜单管理全查数据集

}
